package org.fuys.coder.domain.audit.model.vo;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.domain.audit.model.vo
 * @className: AuditResultLabels
 * @author: WangJing
 * @description: 违规标签枚举
 * @date: 2024/6/23 11:54
 * @version: 1.0
 */
public enum AuditResultLabels {
    NORMAL("normal"){
        @Override
        public String getDesc() {
            return "正常";
        }
    },
    SPAM("spam"){
        @Override
        public String getDesc() {
            return "含有垃圾信息";
        }
    },
    AD("ad"){
        @Override
        public String getDesc() {
            return "存在广告行为";
        }
    },
    POLITICS("politics"){
        @Override
        public String getDesc() {
            return "存在涉政嫌疑";
        }
    },
    TERRORISM("violence"){
        @Override
        public String getDesc() {
            return "存在暴恐内容";
        }
    },
    ABUSE("abuse"){
        @Override
        public String getDesc() {
            return "存在辱骂内容";
        }
    },
    PORN("porn"){
        @Override
        public String getDesc() {
            return "存在色情内容";
        }
    },
    FLOOD("flood"){
        @Override
        public String getDesc() {
            return "存在无营养内容";
        }
    },
    CONTRABAND("contraband"){
        @Override
        public String getDesc() {
            return "存在违禁内容";
        }
    },
    MEANINGLESS("meaningless"){
        @Override
        public String getDesc() {
            return "存在无意义内容";
        }
    },
    HARMFUL("harmful"){
        @Override
        public String getDesc() {
            return "存在不良导向";
        }
    };


    String desc;

    AuditResultLabels(String desc) {
        this.desc=desc;
    }

    public String getDesc(){
        return "";
    }


    public static String getDesc(String label){
        final AuditResultLabels[] values = AuditResultLabels.values();
        for (AuditResultLabels value : values) {
            if(value.desc.equals(label)){
                return value.getDesc();
            }
        }
        return "";
    }

    public static String like(String label){
        final AuditResultLabels[] values = AuditResultLabels.values();
        for (AuditResultLabels value : values) {
            if(value.desc.startsWith(label)){
                return value.getDesc();
            }
        }
        return "";
    }
}
